<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/main.css">
    <style>
        .float-layer-box {
            border: 1px solid #000;
        }
    </style>
</head>
<body>
<div class="btn btn-blue" id="btn">点击我</div>
<div class="float-layer-box dn">
    texttext
    <div class="btn btn-blue cancel">取消</div>
    <br>
    <div class="btn btn-blue cancel">确定</div>
</div>
</body>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/floating.js"></script>
<script>
    $(
        function() {
            $('.float-layer-box').floatBox(
                $('#btn.btn-blue'),$('.cancel'),
                {'maskStyle': {'background': '#000', 'opacity': '.3'}},
                function() {
                   alert('hi')
                }
            );
        }
    );
</script>
</html>